import 'package:shared_preferences/shared_preferences.dart';

class SharedStorage{
  void set(String key, String value) async{
    SharedPreferences prefs = await SharedPreferences.getInstance();
    prefs.setString(key, value);
  }

  Future<String> get(String key) async{
    SharedPreferences prefs = await SharedPreferences.getInstance();
    return prefs.getString(key)??"";
  }

  void remove(String key) async{
    SharedPreferences prefs = await SharedPreferences.getInstance();
    prefs.remove(key);
  }

  void removeAll() async{
    SharedPreferences prefs = await SharedPreferences.getInstance();
    prefs.clear();
  }
}